package cn.ymatou.activityadmin.service;

import java.io.IOException;

import org.apache.http.client.ClientProtocolException;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.business.service.AdminCallService;
import com.ymttest.utils.EnvSetup;

public class AuditApproveCall extends YmatouAutoTestCall{

	private static String opurl ="/JsonData/AuditApprove";
	
	public AuditApproveCall() {
		super(EnvSetup.getSystemUrl("activityadmin"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Cookie", cookie);
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public static void main(String[] args) throws ClientProtocolException, IOException {
		AdminCallService.getLoginCookieList();
		AuditApproveCall approveCall= new AuditApproveCall();
		approveCall.setCookies(AdminCallService.getLoginCookieList());
		
		
		approveCall.callAndGetReturnData();
	}
	
/*	public void callService (){
		try {
			JSONObject jsonBean = new JSONObject(this.entityString);
			JSONArray productIdInActivityIds = jsonBean.getJSONArray("productInActivityIds");
			YmtProductsInActivityWapper ymtProductsInActivityWapper = new YmtProductsInActivityWapper();
			ProductDetailModelWapper productDetailModelWapper = new ProductDetailModelWapper();
			for(int i=0;i<productIdInActivityIds.length();i++){
				//get products under the activityid
				YmtProductsInActivity ymtProductsInActivity= ymtProductsInActivityWapper.selectByProductInActivityId(productIdInActivityIds.getInt(i));
				String productId = ymtProductsInActivity.getSproductid();
				productDetailModelWapper.getCountByProductId(productId);
			}
			 super.callService();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}*/
}
